<?php

namespace addons\zzyy\module;

use app\admin\model\zzyy\ZzyyReserve;

class Reserve
{
    static public function getReserveFormatInfo($id)
    {
        $reserve = ZzyyReserve::get($id);

        unset($reserve->tts_bluekeyid);
        unset($reserve->tts_bluelockdata);
        unset($reserve->tts_randkeyid);
        unset($reserve->tts_randkeypwd);

        $reserve->store = Store::getStoreFormatInfo($reserve->store_id);
        $reserve->room = Room::getRoomFormatInfo($reserve->room_id);

        return $reserve;
    }

    static public function getReserveFullInfo($id)
    {
        $reserve = ZzyyReserve::get($id);

        $reserve->store = Store::getStoreFormatInfo($reserve->store_id);
        $reserve->room = Room::getRoomFormatInfo($reserve->room_id);

        return $reserve;
    }

}